<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<input type="hidden" name="id" value="${id}">
<input type="hidden" name="createTime" value="${createTime}">
<input type="hidden" name="createUser" value="${createUser}">
<table style="width: 100%;" class="listtable">
        <tr>
            <td class="tr_left"><span class="required">*</span>甲&nbsp;&nbsp;板:&nbsp;</td>
            <td class="tr_right">
                <input type="text" id="select_deckinfo" name="deckId" value="${deckId}"
                       class="easyui-combobox" data-options="required:true,missingMessage:'请选择甲板'"/>
            </td>
        </tr>
        <tr class="row-even">
            <td class="tr_left"><span class="required">*</span>地图名称:&nbsp;</td>
            <td class="tr_right">
                <input type="text" name="name" value="${name}" maxlength="200"  class="easyui-validatebox" data-options="required:true,missingMessage:'请输入地图名称'"/>
            </td>
        </tr>
        <tr>
            <td class="tr_left"><span class="required">*</span>地图编号:&nbsp;</td>
            <td class="tr_right">
                <input type="text" name="code" value="${code}" maxlength="200"  class="easyui-validatebox" data-options="required:true,missingMessage:'请输入地图编号'"/>
            </td>
        </tr>
        <tr class="row-even">
            <td class="tr_left"><span class="required">*</span>地图:&nbsp;</td>
            <td class="tr_right">
                <c:choose>
                    <c:when test="${bgImage != null && bgImage != ''}">
                        <img id="photoPanel" src="${pageContext.request.contextPath}${bgImage}" style="width: 150px; max-height: 200px;">
                    </c:when>
                    <c:otherwise>
                        <img id="photoPanel" src="${pageContext.request.contextPath}/images/headpicture/none.gif" style="width: 150px; max-height: 200px;">
                    </c:otherwise>
                </c:choose>
                <br>
                <input type="text" name="bgImage" id="bgImage" value="${bgImage}" maxlength="200" class="easyui-validatebox"
                       data-options="required:true,missingMessage:'请上传照片'" readonly/>
                <input type="button" value="上传" onclick="showFileUpload('bgImage')">
            </td>
        </tr>
    </table>
<script type="text/javascript">
    $(function(){
        $('#select_deckinfo').combobox({
            url:'${pageContext.request.contextPath}/deckInfoAction!getDeckInfoSelectData.action',
            valueField:'id',
            textField:'name',
            editable:false
        });

    });
</script>
